package com.yili.oa.dao;

import com.yili.oa.models.FtVip;
import com.yili.oa.models.FtVipExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface FtVipMapper {
    @SelectProvider(type=FtVipSqlProvider.class, method="countByExample")
    long countByExample(FtVipExample example);

    @DeleteProvider(type=FtVipSqlProvider.class, method="deleteByExample")
    int deleteByExample(FtVipExample example);

    @Delete({
        "delete from ft_vip",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    @Insert({
        "insert into ft_vip (id, vip_level, ",
        "accumulate_effective_bet, promotion_award, ",
        "week_award, month_award, ",
        "accumulate_promotion_award, reward, ",
        "deposit_speedup_channel, exclusive_customer_service_manager)",
        "values (#{id,jdbcType=BIGINT}, #{vipLevel,jdbcType=INTEGER}, ",
        "#{accumulateEffectiveBet,jdbcType=DECIMAL}, #{promotionAward,jdbcType=DECIMAL}, ",
        "#{weekAward,jdbcType=DECIMAL}, #{monthAward,jdbcType=DECIMAL}, ",
        "#{accumulatePromotionAward,jdbcType=DECIMAL}, #{reward,jdbcType=REAL}, ",
        "#{depositSpeedupChannel,jdbcType=INTEGER}, #{exclusiveCustomerServiceManager,jdbcType=INTEGER})"
    })
    int insert(FtVip record);

    @InsertProvider(type=FtVipSqlProvider.class, method="insertSelective")
    int insertSelective(FtVip record);

    @SelectProvider(type=FtVipSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="vip_level", property="vipLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="accumulate_effective_bet", property="accumulateEffectiveBet", jdbcType=JdbcType.DECIMAL),
        @Result(column="promotion_award", property="promotionAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="week_award", property="weekAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="month_award", property="monthAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="accumulate_promotion_award", property="accumulatePromotionAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="reward", property="reward", jdbcType=JdbcType.REAL),
        @Result(column="deposit_speedup_channel", property="depositSpeedupChannel", jdbcType=JdbcType.INTEGER),
        @Result(column="exclusive_customer_service_manager", property="exclusiveCustomerServiceManager", jdbcType=JdbcType.INTEGER)
    })
    List<FtVip> selectByExample(FtVipExample example);

    @Select({
        "select",
        "id, vip_level, accumulate_effective_bet, promotion_award, week_award, month_award, ",
        "accumulate_promotion_award, reward, deposit_speedup_channel, exclusive_customer_service_manager",
        "from ft_vip",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="vip_level", property="vipLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="accumulate_effective_bet", property="accumulateEffectiveBet", jdbcType=JdbcType.DECIMAL),
        @Result(column="promotion_award", property="promotionAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="week_award", property="weekAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="month_award", property="monthAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="accumulate_promotion_award", property="accumulatePromotionAward", jdbcType=JdbcType.DECIMAL),
        @Result(column="reward", property="reward", jdbcType=JdbcType.REAL),
        @Result(column="deposit_speedup_channel", property="depositSpeedupChannel", jdbcType=JdbcType.INTEGER),
        @Result(column="exclusive_customer_service_manager", property="exclusiveCustomerServiceManager", jdbcType=JdbcType.INTEGER)
    })
    FtVip selectByPrimaryKey(Long id);

    @UpdateProvider(type=FtVipSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FtVip record, @Param("example") FtVipExample example);

    @UpdateProvider(type=FtVipSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FtVip record, @Param("example") FtVipExample example);

    @UpdateProvider(type=FtVipSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FtVip record);

    @Update({
        "update ft_vip",
        "set vip_level = #{vipLevel,jdbcType=INTEGER},",
          "accumulate_effective_bet = #{accumulateEffectiveBet,jdbcType=DECIMAL},",
          "promotion_award = #{promotionAward,jdbcType=DECIMAL},",
          "week_award = #{weekAward,jdbcType=DECIMAL},",
          "month_award = #{monthAward,jdbcType=DECIMAL},",
          "accumulate_promotion_award = #{accumulatePromotionAward,jdbcType=DECIMAL},",
          "reward = #{reward,jdbcType=REAL},",
          "deposit_speedup_channel = #{depositSpeedupChannel,jdbcType=INTEGER},",
          "exclusive_customer_service_manager = #{exclusiveCustomerServiceManager,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(FtVip record);
}